package gov.bls.ncs.orsdb.service;

import org.springframework.stereotype.Controller; 
import org.springframework.web.bind.annotation.RequestMapping; 
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import gov.bls.ncs.orsdb.service.OccProfileService;
import gov.bls.ncs.orsdb.vos.occprofile.EnvConditionsVO;
import gov.bls.ncs.orsdb.vos.occprofile.OccProfileVO;
import gov.bls.ncs.orsdb.vos.occprofile.PhysDemandsVO;
import gov.bls.ncs.orsdb.vos.occprofile.SvpVO;

@Controller
@RequestMapping("/occProfileSvc")
public class OccProfileController {
	
	@Autowired
	OccProfileService occSvc;
		
	@RequestMapping(value="getOccProfileData", method=RequestMethod.GET, produces="application/json")
	public @ResponseBody OccProfileVO getMogData() {
		OccProfileVO occVO = new OccProfileVO();
		
		ArrayList<SvpVO> svpList;
		svpList = occSvc.getSvpList();
		
		ArrayList<PhysDemandsVO> physList;
		physList = occSvc.getPhysDemandsList();
		
		ArrayList<EnvConditionsVO> envList;
		envList = occSvc.getEnvConditionsList();
		
		occVO.setSvpList(svpList);
		occVO.setPhysDemandsList(physList);
		occVO.setEnvConditionsList(envList);
		
		return occVO;
	}
}
